package cn.lyjuan.android.demofive.ui.component.spinner;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import cn.lyjuan.android.demofive.R;

/**
 * Created by chad on 2016/3/4.
 */
public class SpinnerActivity extends Activity
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        this.setContentView(R.layout.ui_spinner);

        Spinner sp = (Spinner) this.findViewById(R.id.ui_spinner);

        String[] date = this.getResources().getStringArray(R.array.ui_spinner_date);
        ArrayAdapter adp = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, date);

        sp.setAdapter(adp);
    }
}
